// by Xeno
private ["_xarti", "_vehicle", "_poss"];
#include "x_setup.sqf"

x_sm_pos = [[9628.6748,4234.7192,0], [9500.6748,4300.7192,0]]; // index: 10,   Artillery at top of mount Vysota
x_sm_type = "normal"; // "convoy"

#ifdef __SMMISSIONS_MARKER__
if (true) exitWith {};
#endif

if (X_Client) then {
	d_current_mission_text = "The enemy is using Scharnhorst as an artillery position. Destroy all the guns and keep collateral damage to a minimum.";
	d_current_mission_resolved_text = "Good job. The guns are destroyed.";
};

if (isServer) then {
	_xarti = switch (d_enemy_side) do {
		case "EAST": {"D30_RU"};
		case "WEST": {"M119"};
		case "GUER": {"D30_Ins"};
	};
	__PossAndOther
	_vehicle = objNull;
	_vehicle = _xarti createvehicle (_poss);
	__addDead(_vehicle)
#ifndef __TT__
	_vehicle addEventHandler ["killed", {_this call XKilledSMTargetNormal}];
#else
	_vehicle addEventHandler ["killed", {_this call XKilledSMTargetTT}];
#endif
	_vehicle lock true;
	sleep 2.21;
	["specops", 5, "basic", 2, _poss,0] spawn XCreateInf;
	sleep 2.045;
	["shilka", 0, "bmp", 0, "uaz_mg", 1, _pos_other,1,0] spawn XCreateArmor;
};